package org.example.demoblg.result;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
@ResponseBody
public class ExceptionAdvice {
 @ExceptionHandler(Exception.class)
 public Result exceptionAdvice(Exception e) {

 return Result.fail(Constant.RESULT_CODE_FAIL,"内部发生错误, 请联系管理员");
 }
 }